{% extends base %}

{% block head %}
<script src="{{_server_home}}/_static/lib/md5/md5.js"></script>
{% end %}
{% block body %}

<div class="card">
    {% set title = "MD5" %}
    {% include "tools/base_title.html" %}
</div>

<div class="card">
    <div class="col-md-6">
        <label>Input</label>
        <textarea id="input" class="col-md-12" rows=10></textarea>
    </div>

    <div class="col-md-6">
        <label>Output</label>
        <textarea id="output" class="col-md-12" rows=10></textarea>
    </div>

    <div class="col-md-12">
        <button onclick="md5Encode()">Encode</button>
    </div>
</div>

<script>
function md5Encode() {
    $("#output").val(MD5($("#input").val()));
}

</script>
{% end %}